<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>vue中的列表渲染</title>
  <script src="../static/vue.js"></script>
</head>
<body>
<div id="app">
  <template v-for='(item,index) in list' :keys='item.id'>
    <p>{{item.content}}</p>
    <span>{{item.id}}</span>
  </template>
  <div v-for="(item,key,index) of userInfo">
    {{item}} {{key}} {{index}}
  </div>
</div>
<script>
  var vm = new Vue({
    el: '#app',
    data: {
      list: [
        {
          id: 0,
          content: '小燕子是想气死我魏姐'
        },
        {
          id: 1,
          content: '张雪迎工作室 澄清'
        },
        {
          id: 2,
          content: '结婚登记率连续4年下降'
        }, {
          id: 3,
          content: '秦俊杰'
        }
      ],
      userInfo: {
        'id': 'id',
        'name': 'name'
      }
    }

  })
</script>
</body>
</html>
